
<div class="app-content-body ">

  <div class="bg-light lter b-b wrapper-md hidden-print">
    <h1 class="m-n font-thin h3">区域代理合约管理</h1>
  </div>

  <div>
    <div class="crud-container crud-reset">
        <div class="row">
            <div class="col-md-8 col-lg-9 col-sm-7 col-xs-7">
                <div class="crud-buttons">
                    <a  dx-toggle="button" dx-options='{"type": "normal"}'>新增合约</a>
                    <div dx-toggle="button" dx-options='{"type": "danger"}'>终止合约</div>
                </div>
            </div>
            <div class="col-md-4 col-lg-3 col-sm-5 col-xs-5">
              <div class="input-group">
		            <input type="text" class="input-sm form-control" placeholder="Search">
		            <span class="input-group-btn">
		              <button class="btn btn-sm btn-default" type="button">搜索</button>
		            </span>
	           </div>
           </div>
        </div>
        <div class="row">
            <div class="col-sm-12 col-md-3">
                <div class="agent_lists" id="simple-treeview">
                </div>
            </div>
            <div class="col-sm-12 col-md-9">
            	<div class="data_list"></div>
            </div>
        </div>
    </div>
  </div>
</div>
<script>
$(function(){
    $(".crud-container").crud({
      url: API("agents"),
	
      columns: [{
        dataField: 'atea',
        caption: '代理区域'
      },{
        dataField: 'default_user_mobile',
        caption: '代理商电话'
      },{
        dataField: 'name',
        caption: '代理商姓名'
      },{
      	dataField: 'id',
        caption: '区域累计分红代理'
      },{
        dataField: 'id',
        caption: '上次更新时间'
      },{
        dataField: 'id',
        caption: '上次更改时间'
      },{
      	 caption: '操作',
	       buttons: [{
	          title: '变更记录',
	          url:''
	        }]
      }]
   });
   
   $("#simple-treeview").dxTreeView({ 
        dataSource: new DevExpress.data.DataSource({
              store: new DevExpress.data.ODataStore({
                   url: "https://js.devexpress.com/Demos/WidgetsGallery/odata/HierarchicalItems"
              })
         }),
        dataStructure: "plain",
        keyExpr: "Id",
        displayExpr: "Name",
        parentIdExpr: "CategoryId",
        hasItemsExpr: "IsGroup",
        virtualModeEnabled: true
    });
})
</script>